function [ CXY ] = Covariance( X , Y , w )

w = w / sum(w) ;

EX = X' * w ;
EY = Y' * w ;

CXY = ( X .* Y )' * w - EX * EY ;

end

